#include "data_type.h"
#include <cuda.h>
#include <cuda_runtime.h>
//#include "tools.h"

namespace Registration {

__global__ void update_tsdf_kernel(uint16_t *depth_image, int image_width,
                                   int image_height, short2 *tsdf_volume,
                                   int3 vloume_size, float voxel_scale,
                                   CameraParams camera_params,
                                   const float truncation_distance,
                                   float *rotation, float *tanslation);

__device__ float3 transform(float3 target_point, const float *rotate_matrix,
                            const float *translation_matrix);

__device__ float norm(float3 input_vector);

void surfce_reconstruction(uint16_t *depth_image, int image_width,
                           int image_height, VolumeData &volume,
                           const CameraParams &cam_params,
                           const float truncation_distance, float *rotation,
                           float *translation);

__global__ void merge_point_cloud(PointXyz *target_point_cloud,
                                  int target_point_num, VolumeData *voxel_data,
                                  int3 voxel_size, float3 vaxel_scale,
                                  int *match_index_array);

} // namespace Registration